#include <iostream>
using namespace std;

namespace wd
{
int num = 100;
void func(){
    cout << "func()"<<endl;
}
namespace cpp
{
int num = 200;
void func(){
    cout << "func()"<<endl;
}

}
}

void test0(){
    cout << wd::cpp::num << endl;
    wd::cpp::func();
}

//方式二，using编译指令一次性引入cpp的实体
void test1(){
    using namespace wd::cpp;
    cout << num << endl;
    func();
}

//方式三，using声明语句
void test2(){
    using wd::cpp::num;
    using wd::cpp::func;
    cout << num << endl;
    func();
}



int main(int argc, char * argv[])
{
    test0();
    test1();
    test2();
    return 0;
}

